
\newcommand{\funcAb}[3]{\Lambda #3_1.\Lambda #3_2\ldots\Lambda #3_k.\la{#1_1}{#2_1}\la{#1_2}{#2_2}\ldots\la{#1_n}{#2_n}}

\noindent
When a new set of genes is created by seed mutation, the genes from the descendant set that are not already in the gene pool and that do not violate size constraints (see Gene Complexity, section \ref{gencomp102}) are added to the gene pool. There are many possible mutation operations that may be applied to a seed to generate a set of descendant genes. Below is a description of the mutation operations we use to produce new genes:
The set of rules that we use in this research was obtained by trial and error.


\MySection{Generating a Descendent Set of Expressions from a Seed Term}
\noindent
\subsection{Context}
Given a context $C$ ,below are listed the term descendence rules.
\begin{enumerate}
\item If the seed expression is the term $t$, of type $\typ{\Pi X.V}$, then one can generate the descendant set composed of all expressions $(t\ A)$, where $A$ is a type that exists in $t$'s context.

\item If the seed expression is the term $t$, of type $\typ{\AT{A}{B}}$, then one can generate the descendant set of of all expression $(t\ a)$, where $a$ is a term of type $A$ that exists in $t$'s context or as a gene expression in the gene pool.

\item If the seed expression is the term $t$, of type $\typ{T}$, that contains a constant $a^A$, then one can generate the descendant set of one element $\{(\la{x}{A}.\repl{t}{x}{a})\text{ of type $\typ{\AT{A}{T}}$}\}$

\item If the seed expression is the term $t$, of type $\typ{T}$ that contains a type constant $\typ{A}$, but does not contain any term constant of  type $\typ{A}$ then one can generate the descendant set of one element: $\{(\Lambda X . \repl{t}{X}{A})\text{ of type $\typ{\Pi X. \repl{T}{X}{A}}$}\}$

\item If the seed is the term $\la{x_1}{X_1}\la{x_2}{X_2}.t$, then one can generate the descendent set of one element $\{\la{x_2}{X_2}\la{x_1}{X_1}.t\}$

\item If the seed is the term $\la{x}{V}.u$ then one can generate the descendent set obtained by:
    \begin{enumerate}
    \item applying any of the listed applicable descendence rules to obtain $D_1$, the descendent set of $u$ with context $C\cup\{x^V\}$
    \item for every expression $t$ in $D_1$, adding $\la{x}{V}.t$ as an element of the descendent set of $\la{x}{V}.u$
    \end{enumerate}

\item If the seed is the term $\Lambda X.u$ then one can generate the descendent set obtained by:
    \begin{enumerate}
    \item applying any of the listed applicable descendence rules to obtain $D_1$, the descendent set of $u$ with context $C\cup\{X\}$.
    \item for every expression $t$ in $D_1$, adding $\Lambda X.t$ as an element of the descendent set of $\Lambda X.u$
    \end{enumerate}

\end{enumerate}
